using System;
using System.Collections;
using System.Runtime.InteropServices;
using System.Text;
namespace BMC.ARSystem
{
	[ClassInterface, Guid("250a0f7e-f68a-4b0f-8407-d5f7f9aeb943"), ProgId("BMC.ARSystem.StatisticResult")]
	public class StatisticResult
	{
		private object _val;
		private ArrayList _groupByValues;
		public object Value
		{
			get
			{
				return this._val;
			}
		}
		public ArrayList GroupByValues
		{
			get
			{
				return this._groupByValues;
			}
		}
		internal StatisticResult(object val, ArrayList groupByValues)
		{
			this._val = val;
			this._groupByValues = groupByValues;
		}
		public override string ToString()
		{
			string text = ",";
			StringBuilder stringBuilder = new StringBuilder();
			IEnumerator enumerator = this._groupByValues.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					object current = enumerator.get_Current();
					stringBuilder.AppendFormat("{0}{1}", current.ToString(), text);
				}
			}
			finally
			{
				IDisposable disposable = enumerator as IDisposable;
				if (disposable != null)
				{
					disposable.Dispose();
				}
			}
			string text2 = stringBuilder.ToString();
			if (text2.EndsWith(text))
			{
				text2.TrimEnd(text.ToCharArray());
			}
			return string.Format("{0}{1}{2}", text2, (text2.get_Length() > 0) ? " : " : "", this.Value.ToString());
		}
	}
}
